/*
 * Copyright (C) 2010-2011 Enrique Lara (enrique.posix2.lara@gmail.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
 * limitations under the License.
  */
package trs.unknown;

import android.net.Uri;

import app.timetogo.R;

import app.timetogo.model.Agency;
import app.timetogo.model.Alarm;
import app.timetogo.model.Route;
import app.timetogo.model.Stop;
import app.timetogo.model.Vehicle;

import java.io.IOException;
import java.util.ArrayList;

import org.xml.sax.SAXException;

public class UnknownAgency implements Agency {
    private static final String UNKNOWN = "UNKNOWN";
    private static final String[] UNKNOWN_ARR = new String[] {
                                                                 UNKNOWN
    };
    private static final Stop UNKNOWN_STOP = new Stop() {
        @Override
        public String getCode() {
            return UNKNOWN;
        }

        @Override
        public String getName() {
            return UNKNOWN;
        }

        @Override
        public String[] getRouteCodes() {
            return new String[] {
                       UNKNOWN_ROUTE.getCode()
                   };
        }
    };

    private static final Route UNKNOWN_ROUTE = new Route() {
        @Override
        public String getCode() {
            return UNKNOWN;
        }

        @Override
        public int getDirectionArrayId() {
            return R.array.destinations_unknown;
        }

        @Override
        public int getImageId() {
            return R.drawable.time_to_transit;
        }

        @Override
        public int getNameId() {
            return R.string.unknown;
        }
    };

    @Override
    public String getName() {
        return UNKNOWN;
    }

    @Override
    public int getPreferenceId() {
        return R.xml.alarm_pref;
    }

    @Override
    public Route getRouteByCode(final String routeCode) {
        return UNKNOWN_ROUTE;
    }

    @Override
    public String[] getRouteCodes() {
        return new String[] {
                   UNKNOWN_ROUTE.getCode()
               };
    }

    @Override
    public String[] getRouteNames() {
        return UNKNOWN_ARR;
    }

    @Override
    public Stop getStopByCode(final String apiCode) {
        return UNKNOWN_STOP;
    }

    @Override
    public Stop getStopByName(final String name) {
        return UNKNOWN_STOP;
    }

    @Override
    public String[] getStopCodes(final String line) {
        return UNKNOWN_ARR;
    }

    @Override
    public String[] getStopNames(final String line) {
        return UNKNOWN_ARR;
    }

    @Override
    public String getTimeZone() {
        return "America/New_York";
    }

    @Override
    public String getUrl() {
        return "http://code.google.com/p/timetotransit/";
    }

    @Override
    public ArrayList<Vehicle> getVehicles(final Stop station) throws IOException, SAXException {
        return new ArrayList<Vehicle>();
    }

    @Override
    public ArrayList<Vehicle> getVehicles(final String apiCode) throws IOException, SAXException {
        return new ArrayList<Vehicle>();
    }

    @Override
    public boolean gotoViewStop(final String apiCode) {
        return false;
    }

    @Override
    public Alarm newAlarm(final Uri uri) {
        return null;
    }
}
